package 齐祥进;

import java.util.HashMap;

public class data2 {
    public static void count(String str){
        char[] chars = str.toCharArray();
        HashMap<Character,Integer> hm = new HashMap();
        for(char c : chars){
            if(!hm.containsKey(c)){
                hm.put(c,1);
            }else{
                hm.put(c, hm.get(c)+1);
            }
        }
        for(Character key: hm.keySet()){
            System.out.print(key + "" + hm.get(key));
        }
    }

    public static void main(String[] args) {
        String str = "aksjbiaosaaguwh";
        count(str);
    }
}
